package com.project.controller;

import com.project.bean.ContryBean;
import com.project.service.IContryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("contry")//别名自己取
//类名记着自己改一下
public class ContryController {
    @Autowired
    private IContryService service;

    @RequestMapping("findAll")
    public List<ContryBean> findAll(){
        return service.findAll();
    }
}